<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // class  Parent{
        //     money = "100w";
        //     house = "大别墅";
        // }
        // class Child extends Parent{
        //     play =()=>{
        //         console.log("造作")
        //     }
        // }
        // let obj = new Child();
        // console.log(obj)
        class Parent {
            constructor(money, house) {
                this.money = money;
                this.house = house;
            }
            work() {
                console.log("挣钱")
            }
        }
        class Child extends Parent{
            constructor(money1,house1){
                super(money1,house1);
            }
            play(){
                console.log("玩")
            }
        }
        let obj = new Child("1k","小公寓");
        console.log(obj);
        obj.work();
        obj.play()

        let fn = (...rest)=>{
            console.log(...rest)
        }
        fn("a","b")
    </script>
</body>
</html>